/**
 * Free software.
 */

package org.nanhill.moo.domain.search.favor;

import org.nanhill.commons.pattern.search.SearchException;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-11-6
 */
public class FavorCategoryIdCriterion extends FavorCriterion {
	private long categoryId;

	public FavorCategoryIdCriterion(long categoryId) {
		super();
		this.categoryId = categoryId;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.moo.domain.search.favor.FavorCriterion#accept(org.nanhill.moo.domain.search.favor.FavorPageVisitor)
	 */
	@Override
	protected void accept(FavorVisitor visitor) throws SearchException {
		visitor.visitCategoryId(this);

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.commons.pattern.search.SearchCriterion#getDisplay()
	 */
	public String getDisplay() {
		return "Favor category id";
	}

	public Long getValue() {
		return categoryId;
	}

}
